package com.justnow.offer;

import java.net.Socket;

/**
 * @author justnow
 * Created on 2020-09-19
 * Description
 */
public class Solution61 {
    public int findLengthOfLCIS(int[] nums) {
        int length = nums.length;
        int left = 0, right = 0;
        int max = 1;
        while (right + 1 < length) {
            if (nums[right] < nums[right + 1]) {
                right = right + 1;
                max = Math.max(max, right - left);
            } else {
                left = right;
                right = right + 1;
            }
        }
        return max;
    }

    public static void main(String[] args) {
        Solution61 solution61 = new Solution61();
        int lengthOfLCIS = solution61.findLengthOfLCIS(new int[]{1, 3, 5, 4, 7});
        System.out.println(lengthOfLCIS);
    }
}
